#include "sdkGlobal.h"
#include "platform_global.h"
#include "platform_print.h"

typedef struct
{
    PrintTransRecordFunc mPrintTransRecordFunc;
    PrintTransDetailsHeadFunc mPrintTransDetailsHeadFunc;
    PrintTransDetailsFunc mPrintTransDetailsFunc;
    PrintTransDetailsTailFunc mPrintTransDetailsTailFunc;
    PrintTransSummaryFunc mPrintTransSummaryFunc;
    PrintTransSettleFunc mPrintTransSettleFunc;
} platform_print_entity;

static platform_print_entity g_platform_print_entity;

void platform_print_init()
{
    memset(&g_platform_print_entity, 0x00, sizeof(g_platform_print_entity));
}

void platform_print_set_print_trans_record_func(PrintTransRecordFunc func)
{
    g_platform_print_entity.mPrintTransRecordFunc = func;
}

PrintTransRecordFunc platform_print_get_print_trans_record_func()
{
    return g_platform_print_entity.mPrintTransRecordFunc;
}

void platform_print_set_print_trans_details_func(PrintTransDetailsFunc func)
{
    g_platform_print_entity.mPrintTransDetailsFunc = func;
}

PrintTransDetailsFunc platform_print_get_print_trans_details_func()
{
    return g_platform_print_entity.mPrintTransDetailsFunc;
}

void platform_print_set_print_trans_details_header_func(PrintTransDetailsHeadFunc func)
{
    g_platform_print_entity.mPrintTransDetailsHeadFunc = func;
}

PrintTransDetailsHeadFunc platform_print_get_print_trans_details_header_func()
{
    return g_platform_print_entity.mPrintTransDetailsHeadFunc;
}

void platform_print_set_print_trans_details_tail_func(PrintTransDetailsTailFunc func)
{
    g_platform_print_entity.mPrintTransDetailsTailFunc = func;
}

PrintTransDetailsTailFunc platform_print_get_print_trans_details_tail_func()
{
    return g_platform_print_entity.mPrintTransDetailsTailFunc;
}

void platform_print_set_print_trans_summary_func(PrintTransSummaryFunc func)
{
    g_platform_print_entity.mPrintTransSummaryFunc = func;
}

PrintTransSummaryFunc platform_print_get_print_trans_summary_func()
{
    return g_platform_print_entity.mPrintTransSummaryFunc;
}

void platform_print_set_print_trans_settle_func(PrintTransSettleFunc func)
{
    g_platform_print_entity.mPrintTransSettleFunc = func;
}

PrintTransSettleFunc platform_print_get_print_trans_settle_func()
{
    return g_platform_print_entity.mPrintTransSettleFunc;
}
